
#ifndef  __HISTORY_POLICY_H__
#define  __HISTORY_POLICY_H__

//********************************************************************
#include "sys_port.h"

#include "list.h"
//********************************************************************
#ifdef __cplusplus
extern "C" {
#endif
//********************************************************************

typedef struct 
{
    int t_year;
    int t_month;
    int t_day;
    char * buff;
} policy_info_t ;

typedef struct  {

	slist_t 	   e_tail;
    policy_info_t  e_attr;
}history_policy_t;

typedef struct  {
    int         last_index;
    int         len;
	slist_t *   e_head;
}history_policy_manage_t;
//********************************************************************
int history_policy_init(void);
int history_policy_add(int y,int m,int d, char *txt);
int history_policy_del(int y,int m,int d);
int history_policy_trav(void);
int history_policy_get_len(void);
history_policy_t * history_policy_get_by_index(int index);
int history_policy_set_last(int index);
int history_policy_get_last(void);
//********************************************************************
#ifdef __cplusplus
}
#endif
//********************************************************************

#endif

